<?php
/**
 * Return
 *
 * If called from within a function, the return statement immediately
 * ends execution of the current function, and returns its argument as
 * the value of the function call.
 *
 * If called from the global scope, then execution of the current
 * script file is ended.
 *
 * @author  Badrus Said <badrus.said@gmail.com>
 * @since   gop1.0
 */
final class gop_Return extends gop_Base {
    public function execute(gop_Base $_caller = null) {
        $this->setCaller($_caller);
        $caller = $this->getCaller();
        while($caller) {
            $caller->interuptExec();
            $caller = $caller->getCaller();
        }
    }
}
?>